package com.liguang.rcs.admin.db.repository;

import com.liguang.rcs.admin.db.entity.DodmsDriverEntity;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import java.util.List;

public interface DodmsDriverRepository extends CrudRepository<DodmsDriverEntity, Long>,
        JpaSpecificationExecutor<DodmsDriverEntity> {
    @Query(value = "select distinct company from dodms_driver", nativeQuery = true)
    List<String> queryALlCOmpany();

    DodmsDriverEntity findByDriverLicense(String driverLicense);
}
